<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddWechatToUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
           $table->string('wechat_account')->nullable()->comment('微信账号');
           $table->string('qq_account')->nullable()->comment('QQ账号');
           $table->boolean('is_agent')->default(false)->comment('是否是代理');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn(['wechat_account','qq_account','is_agent']);
        });
    }
}
